<?php

namespace App\Transformer;


use App\Models\Banner;
use League\Fractal\TransformerAbstract;

/**
 * Class BannerTransformer
 * @package App\Transformer
 */
class BannerTransformer extends TransformerAbstract
{
    /**
     * @param Banner $banner
     * @return array
     */
    public function transform(Banner $banner)
    {
        return [
            'id' => $banner['id'],
            'name' => $banner['name'],
            'description' => $banner['description'],
            'items' => $banner['items']
        ];
    }
}